
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <title>欢迎</title>

    <link href="/webjars/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
	<link href="/webjars/bootstrap-table/1.11.1/dist/bootstrap-table.css" rel="stylesheet" />
	<link href="/resources/js/treeView/bootstrap-treeview.min.css" rel="stylesheet" />
    <link href="/resources/css/index.css" rel="stylesheet">

  </head>

  <body>

    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button"  class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#" th:text="${appName}"></a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
            <li><a href="#" onclick='logout()'>注销</a></li>
          </ul>
          
        </div>
      </div>
    </nav>

    <div class="container-fluid">
      <div class="row">
        <div class="col-sm-3 col-md-2 sidebar" style="padding: 5px">
       		 <div id="tree"></div>  	 
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main" id="main"  style="padding: 5px">
 <pre>         
			 ┏┓          ┏┓
			┏┛┻━━━━━━━━━━┛┻┓
			┃              ┃   
			┃      ━       ┃
			┃   ┳┛   ┗┳    ┃
			┃              ┃
			┃      ┻       ┃
			┃              ┃
			┗━┓          ┏━┛
			  ┃          ┃                  
			  ┃          ┃
			  ┃          ┗━━━┓
			  ┃              ┣┓
			  ┃              ┏┛
			  ┗┓┓┏━━━━━━━┳┓┏━┛
			   ┃┫┫       ┃┫┫
			   ┗┻┛       ┗┻┛
 </pre>
        </div>
      </div>
    </div>

<script type="text/javascript">
var ctx="";
var devModel=true;
</script>
<script src="/webjars/jquery/1.10.1/jquery.min.js"></script>
<script src="/webjars/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="/webjars/bootstrap-table/1.11.1/dist/bootstrap-table.min.js"></script>
<script src="/webjars/bootstrap-table/1.11.1/dist/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="/resources/js/common.js"></script>
<script src="/resources/js/ajaxUtil.js"></script>
<script src="/resources/js/dialog.js"></script>
<script src="/resources/js/tableUtil.js"></script>
<script src="/resources/js/validate.js"></script>
<script src="/resources/js/treeView/bootstrap-treeview.min.js"></script>
  </body>
</html>
<script>

function logout(){
	self.location.href="/logout"
}

function show(el,url){
	$(".active").removeClass("active");
	$(el).parent().addClass("active");
	ajaxUtil.html(url,function(html){
		$("#main").html(html);
	});
}

ajaxUtil.json('/app/document/treeView','',function(ret){
	console.log(ret);
	$('#tree').treeview({
		data:ret.data,
		onNodeSelected:function(event, data) {
			if(data.id){
				var url='/app/document/detail/'+data.id;
				ajaxUtil.html(url,function(html){
					$("#main").html(html);
				});
			}
		}
	});
})

   

</script>
